package com.lin.baby.boot.chapter2.aspect;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Service;

/**
 * Class Desc
 *
 * @author WangYang
 * @version 1.0
 * @datetime 2016/10/13 17:51
 */
@Aspect
@Service("logAspect")
public class LogAspect {

    @Pointcut("execution(* com.lin.baby.boot.chapter1.service.impl.*.*(..))")
    public void pointCut(){}

    @Before("pointCut()")
    public void before(JoinPoint joinPoint){
        System.out.println("开始拦截了啊！");
    }
}
